Repository navigation
Fix libjpeg-turbo shared lib build: force PIC for bundled zlib/spng - #80
Merged
Merged
Conversation
libjpeg-turbo 3.2.0 bundles a vendored zlib/spng as CMake OBJECT libraries used by both turbojpeg-static and the shared turbojpeg target. CMake does not auto-apply -fPIC to OBJECT libraries reused across static and shared targets, causing linking of libturbojpeg.so to fail with "relocation R_X86_64_32 ... recompile with -fPIC". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LIBJPEG_TURBO_VERSION3.1.4 → 3.2.0 (supersedes renovate's #66, which will auto-close once this merges).OBJECTlibraries, which are reused by both the static and sharedturbojpegtargets.-fPICtoOBJECTlibrary targets shared between static and shared consumers, so linkinglibturbojpeg.sofailed withrelocation R_X86_64_32 against '.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC— see failing run from Update dependency libjpeg-turbo/libjpeg-turbo to v3.2.0 #66.-DCMAKE_POSITION_INDEPENDENT_CODE=ONto the libjpeg-turbo cmake invocation to force PIC on all objects, fixing the shared-lib link so the 3.2.0 upgrade can build.Test plan
dockerfiles/Dockerfile(amd64) with libjpeg-turbo 3.2.0🤖 Generated with Claude Code